#ifndef __os_h__
#define __os_h__

#include<stdio.h>

/*
#define SYS_FORK_FAILED		-1
#define SYS_SH_FAILED
#define SYS_SH_SUCCESS
*/
#define TMP_FILENAME_LEN	16
#define TMP_FILE_DIR		"/tmp/osprobe/"

typedef struct __smtp_conf{
	char SmtpServer[64];	//"smtp-internal.supor.com"		// 172.24.1.15
	char SmtpPort[8];		//"25"
	//char SmtpConnSecurity[32];	//SMTP_SECURITY_NONE
	//char SmtpLog[16];			// SMTP_DEBUG
	char SmtpCaFile[64];		// NULL
	//char SmtpAuth[64];			//SMTP_AUTH_NONE
	char SmtpUser[64];
	char SmtpUserPass[64];
	char Sender[64];
	char SenderAlias[64];
	char Subject[256];
	char Receiver[64];
	char ReceiverAlias[64];
}SMTP_CFG;


void random_string(int random_len, char* random_buf, unsigned long seed);

long fstr_alloc(FILE* fp, char** stream);

void fstr_free(char* fstrbuf);

extern struct __smtp_conf CfgSmtp;
int load_conf_smtp(char* cfgfile);
int sendmail(struct __smtp_conf* Mail, char* MailContent);
void print_conf_smtp(void);

#endif